﻿namespace Sai.Core.Reporting
{
	public class ReportIndex
	{
        public ReportIndex()
        {
        }

        public ReportIndex(string path, string title, string guid)
        {
            this.Path = path;
            this.Title = title;
            this.Guid = guid;
        }

        public ReportIndex(IProductReleaseDifference difference, IReportOutput output)
            : this(output.Path, 
            string.Format("API changes between {0} and {1}", difference.FromVersion, difference.ToVersion),
            difference.Identifier)
        {
        }

        public ReportIndex(IAssemblyDifference difference, IReportOutput output)
            : this(output.Path, 
            string.Format("Assembly {0}", difference.Name),
            difference.Identifier)
        {
        }

        public ReportIndex(ITypeDifference difference, IReportOutput output)
            : this (output.Path, 
            string.Format("Type {0}", difference.Name),
            difference.Identifier)
		{ 
		}

        public ReportIndex(ITypeListing listing, IReportOutput output)
            : this(output.Path, 
            listing.Name,
            listing.Identifier)
        {
        }

		public string Path { get; set; }

		public string Title { get; set; }

		public string Guid { get; set; }
	}
}
